<?php
interface i_shipping_carrier {
    /**
     * Returns shipping information for the set order.
     * @return shipping_rate_object
     */
    public function get_shipgment_transactional_info(order_m_order $obj);
    /**
     * Uses the shipping_rate_object to store different shipping inforamtion
     * may be in its own table or somewhere.
     * @param shipping_rate_object $sro
     * @return bool|void
     *
     */
    public function __save_shipping_info(shipping_rate_object $sro);
    /**
     * Returns all the shipping rates available for the current order.
     * @return shipping_rates
     *
     */
    public function __get_rates();
    /**
     * Rmoves the shipping info entry(if it saved any in its own table or anywhere else)
     * @return bool|void
     */
    public function clear_shipment_info();
    /**
     * For any operation if there was any error ; should be accessible by this
     * function.
     * @return strting
     */
    public function get_error_message();
    /**
     * For any requested operatin if theres any error ; you should set that error
     * with this function
     * @param string $msg
     */
    public function set_error_message($msg);
    /**
     * When trying to get rates for the order this function should be called
     * to ensure that all order data is available/valid to get the rates
     * for this carrier.
     * @return bool
     */
    public function is_valid_for_rates();
    /**
     * When client/user choose a rate from a given list of shipping rates
     * provided with a carrier at that time this function is called back to that
     * carrier with all rates to re-validate the request/selection and then
     * return a rate object(selectd rate).
     * @param shipping_rates @sr
     * @param CI_Input $ci_post
     * @return shipping_rate_object|null
     */
    public function get_valid_rate_selection(shipping_rates $sr,CI_Input $ci_post);
    /**
     * Gets you the carrier id(its unique)
     * @return string
     */
    public function get_carrier_id();
    /**
     * The order object that carrrier should work on
     * @return order_m_order|null
     */
    public function get_order_obj();
    /**
     * Set the order object for the carrier
     * @param order_m_order $obj
     * @return void
     */
    public function set_order_object(order_m_order $obj);
    
    
}

?>